﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BattleMaster_IRCbot.UserCommands
{
    class Status : Command
    {
        public override string Name { get { return _name; } }
        public override string[] Aliasses { get { return _aliasses; } }
        public override string Description { get { return _description; } }
        public override string ShortDesc { get { return _shortDesc; } }

        public Status()
        {
            _name = "Status";
            _aliasses = new string[] { "stats" };
            _description = "Displays the character's basic stats such as HP and MP.";
            _shortDesc = "Shows your basic stats.";
        }

        public override void Verb(Game game, string msgOrigen, string[] cmd)
        {
            bool characterFound = false;
            if (msgOrigen != "console")
            {
                foreach (Character C in game.Characters)
                {
                    if (C.Name == msgOrigen)
                    {
                        characterFound = true;
                        game.ircHandler.sendNotice(msgOrigen, C.statString());
                    }
                }
                if (!characterFound) game.ircHandler.sendNotice(msgOrigen,"Character not found in active list. Are you logged in?");
            }
        }
    }
}
